<div id="block-comments" class="block">
  <div class="secondary-navigation">
    <ul>
      <li class="first"><%=link_to @product.name ,product_path(@product) %></li>
      <li class="first active"><a href="#block-comments">咨询</a></li>
       <li class="first"><%=link_to '评论' ,product_product_comments_path(@product) %></li>
    </ul>
    <div class="clear">   </div>
  </div>
  <div class="content">
    <h2 class="title">商品咨询</h2>
    <div class="inner">
      <table  class="table">
        
        <% @prodcut_contacts.each do |prodcut_contact| %>
          <tr class="odd">
            <td> 问题</td>
            <td><%=h prodcut_contact.name %></td>
          </tr>
          <tr class="odd">
            <td>回复</td>
            <td><%=h prodcut_contact.reply %></td>
          </tr>
        
        <% end %>
      </table>
            <%= will_paginate @prodcut_contacts %>
<br />
<br />
      <% form_for  @product_contact,:url =>product_product_contacts_path(params[:product_id]),:html => {:class => "no-floating form"} do |f| %>
        <input id="product_contact_user_id" type="hidden" name="product_comment[user_id]" value="<%=session[:user_id]%>"/>
        <%= f.hidden_field :product_id %>
        <table class="table">
          <tbody>
            <tr class="odd">
              <td>问题</td><td><%= f.text_area :name ,:size => "50x5" %></td>
            
            </tr>
            <tr class="odd">
              <td>手机或电话</td><td><%= f.text_field :phone%></td>
            
            </tr>
            <tr class="odd">
              <td>邮件</td><td><%= f.text_field :email %></td>
            
            </tr>
            <tr class="odd">
              <td></td>   
              <td align="right" >  <input type="submit" value='提交' class="button"  /> </td>
            </tr>
          </tbody>
        </table>
      <% end %>
      <br />
    </div>
  </div>                               
</div>


